<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>单向判断语句</title>
</head>
<body>
<script type="text/javascript">
  var num1=100;   //定义并赋值变量num1
  var num2=200;   //定义并赋值变量num2
  if(num1>num2)
  {
 	alert('成立');  //如果条件成立则弹出“成立”
  }
  alert('对不起，条件不成立');  //如果条件不成立则弹出该对话框内容
 </script>
</body>
</html>